﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="quanlySanpham.ascx.cs" Inherits="Thv.admin.Pages.quanlySanpham" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
    <script type="text/javascript">

        function ClosePopup() {
            popup.Hide();
        }
        function cpImage_EndCallback(s, e) {
            popup.UpdatePosition();
        }
        function OnBodyKeyDown(e) {
            if (ASPxClientUtils.GetKeyCode(e) == EscKeyCode)
                ClosePopup();
            return true;
        }

        function OnImageMouseOver(image) {
            //            popup.SetContentHtml(image.getAttribute("value"));
            //            popup.ShowAtElement(image);

            popup.SetContentUrl(image.getAttribute("value"));
            popup.Show();
        }
        function OnImageMouseOut(image) {
            popup.Hide();
        }
</script>
    <div style="width: 100%; margin: 20px 0px 20px 0px">
    <table width="100%">
        <tr>
            <td style="width: 1%">
            </td>
            <td style="width: 98%" colspan="2">
            </td>
            <td style="width: 1%">
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                <dx:ASPxComboBox ID="cbLoai" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                    ValueType="System.String">
                    <ClientSideEvents ValueChanged="function(s, e) {
	                            cbPanel.PerformCallback('ChangeLoai')}" />
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                </dx:ASPxComboBox>
            </td>
            <td>
    
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td colspan="2">
                <dx:ASPxCallbackPanel ID="ASPxCallbackPanel1" runat="server" Width="100%" ClientInstanceName="cbPanel"
                    OnCallback="cbPanel_Callback">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                            <dx:ASPxGridView ID="grvData" runat="server" AutoGenerateColumns="False" KeyFieldName="ID"
                                CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" Width="100%">
                                <Columns>
                                    <dx:GridViewDataTextColumn Caption="ID" FieldName="ID" ShowInCustomizationForm="True"
                                        Visible="False" VisibleIndex="9">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Tên" FieldName="iProName" ShowInCustomizationForm="True"
                                        VisibleIndex="1" Width="20%">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataImageColumn Caption="Hình ảnh" FieldName="image" ShowInCustomizationForm="True"
                                        VisibleIndex="2" Width="20%">
                                        <DataItemTemplate>
                                            <dx:ASPxImage ID="ASPxImage1" runat="server" ImageUrl='<%# "~/trangchu/images/Product/"+Eval("image") %>'
                                                Width="50px">
                                            </dx:ASPxImage>
                                        </DataItemTemplate>
                                    </dx:GridViewDataImageColumn>
                                    <dx:GridViewDataTextColumn Caption="Ngày đăng" FieldName="iDatepost" ShowInCustomizationForm="True"
                                        UnboundType="DateTime" VisibleIndex="3" Width="10%">
                                        <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                                        </PropertiesTextEdit>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Giá" FieldName="iGiamoi" ShowInCustomizationForm="True"
                                        VisibleIndex="4" Width="10%">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataCheckColumn Caption="Gợi ý" FieldName="goiy" ShowInCustomizationForm="True"
                                        UnboundType="Boolean" VisibleIndex="5" Width="10%">
                                    </dx:GridViewDataCheckColumn>
                                    <dx:GridViewDataCheckColumn Caption="Trang chủ" FieldName="trangchu" ShowInCustomizationForm="True"
                                        UnboundType="Boolean" VisibleIndex="6" Width="10%">
                                    </dx:GridViewDataCheckColumn>
                                    <dx:GridViewDataCheckColumn Caption="Duyệt" ShowInCustomizationForm="True" VisibleIndex="7"
                                        Width="10%" FieldName="iflag">
                                    </dx:GridViewDataCheckColumn>
                                    <dx:GridViewDataTextColumn Caption="Action" ShowInCustomizationForm="True" VisibleIndex="8" Name="Action">
                                        <DataItemTemplate>
                                            <asp:HiddenField ID="hdfFlag" runat="server" Value='<%# Eval("iflag") %>' />
                                            <table class="style1">
                                                <tr>
                                                    <td>
                                                        <dx:ASPxImage ID="ASPxImage2" runat="server" ImageUrl="~/admin/images/file_add.png"
                                                            ToolTip="Duyệt sản phẩm">
                                                            <ClientSideEvents Click="function(s, e) {cbPanel.PerformCallback('Duyet')}" />
                                                        </dx:ASPxImage>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxImage ID="ASPxImage3" runat="server" ImageUrl="~/admin/images/deletered.png"
                                                            ToolTip="Xóa sản phẩm" Width="19px">
                                                            <ClientSideEvents Click="function(s, e) {cbPanel.PerformCallback('Xoa')}" />
                                                        </dx:ASPxImage>
                                                    </td>
                                                    <td>
                                                     <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/admin/images/textdocument.png"
                                                            OnClick="ImageButton1_Click" Width="19px" />
                                                        
                                                    </td>
                                                </tr>
                                            </table>
                                        </DataItemTemplate>
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                                <SettingsBehavior AllowFocusedRow="True" />
                                <SettingsBehavior AllowFocusedRow="True"></SettingsBehavior>
                                <SettingsPager PageSize="50">
                                </SettingsPager>
                                <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                                    <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                                    </LoadingPanelOnStatusBar>
                                    <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                                    </LoadingPanel>
                                </Images>
                                <ImagesFilterControl>
                                    <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                                    </LoadingPanel>
                                </ImagesFilterControl>
                                <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                    </Header>
                                    <LoadingPanel ImageSpacing="5px">
                                    </LoadingPanel>
                                </Styles>
                                <StylesEditors ButtonEditCellSpacing="0">
                                    <ProgressBar Height="21px">
                                    </ProgressBar>
                                </StylesEditors>
                            </dx:ASPxGridView>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxCallbackPanel>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td colspan="2">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
</div>

 <dx:ASPxPopupControl ID="popup" runat="server" AllowDragging="True" AllowResize="True"
        CloseAction="CloseButton" PopupHorizontalAlign="Center" RenderMode="Lightweight"
        PopupVerticalAlign="WindowCenter" Width="900px" Height="600px" FooterText="Try to resize the control using the resize grip or the control's edges"
        HeaderText="Nội dung" ClientInstanceName="popup" EnableHierarchyRecreation="True"
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
        EnableHotTrack="False" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
        </LoadingPanelImage>
        <LoadingPanelStyle ImageSpacing="5px">
        </LoadingPanelStyle>
        <ContentCollection>
            <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">
            </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>


